perm filename DOC1[GEM,BGB] blob
sn#088714 filedate 1974-03-01 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00012 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 TITLE PAGE - GEOMED MANUAL.
C00005 00003 CONTENTS
C00006 00004 INTRODUCTION.
C00008 00005 GEOMED COMMAND SUMMARY:
C00010 00006 GEOMED COMMAND SUMMARY:
C00012 00007 GEOMED COMMAND SUMMARY:
C00014 00008 PRIMER: INSTANT CUBE, TRANSLATION.
C00018 00009 PRIMER: CONTROL, META, AND META-CONTROL.
C00022 00010 PRIMER: ROTATION.
C00026 00011 PRIMER: DRAWING A CUBE.
C00029 00012 PRIMER: DRAWING A TORUS.
C00034 ENDMK
C⊗;
TITLE PAGE - GEOMED MANUAL.
SAILON NUMBER 68. GEOMED MANUAL
STANFORD ARTIFICIAL INTELLIGENCE LABORATORY MARCH 1974
OPERATING NOTE NUMBER 68.2
GEOMED - GEOMETRIC EDITOR.
Bruce g. Baumgart
ABSTRACT:
GEOMED is a package of subroutines for doing 3-D geometric
modeling. Used from a keyboard, GEOMED is an interactive drawing
program; used as a package of SAIL or LISP accessible subroutines,
GEOMED is a graphics language. With GEOMED, arbitrary polyhedra can
be contructed; moved about and viewed in perspective with hidden
lines eliminated. In addition to polyhedra; camera and image models
are provided so that simulators relevant to computer vision, problem
solving, and animation can be constructed.
---------------------------------------------------------------------
This research was supported in part by the Advanced Research
Projects Agency of the Office of the Secretary of Defense under
Contract DAHC15-73-C-0435
The views and conclusions contained in this document are those of
the author and should not be interpreted as necessarily representing
the official policies, either expressed or implied, of the Advanced
Research Project Agency or the United States Government.
---------------------------------------------------------------------
CONTENTS
SECTION PAGE
INTRODUCTION.
This SAILON consists of two parts: part one, explains the
external keyboard commands of GEOMED for use as a drawing program;
and part two, explains the internal SAIL and LISP accessible
subroutines of GEOMED for use as a language for geometric modeling.
The command summary comes at the beginning of this document
rather than at the end so that the program itself can always find the
summary on pages 4, 5 and 6 of this file GEOMED.BGB[S,DOC].
This document can be accessed while using GEOMED by typing the "H"
help command.
GEOMED COMMAND SUMMARY:
α CONTROL KEY PREFIX.
β META KEY PREFIX.
ε META-CONTROL PREFIX.
: EUCLIDEAN TRANSFORMATION +X. TRANSLATION.
; EUCLIDEAN TRANSFORMATION -X. α ROTATION.
) EUCLIDEAN TRANSFORMATION +Y. β DILATION.
( EUCLIDEAN TRANSFORMATION -Y. ε REFLECTION.
* EUCLIDEAN TRANSFORMATION +Z.
- EUCLIDEAN TRANSFORMATION -Z.
/ HALVE STRENGTH.
\ DOUBLE STRENGTH.
! TRANSLATION DEFAULT SWITCH.
@ ROTATION DEFAULT SWITCH.
π ACCEPT ROTATION STRENGTH.
λ ACCEPT TRANSLATION STRENGTH.
% ACCEPT DILATION RATIO.
∂ FLIP NODE DISPLAY SWITCH. α∂ FLIP NODE DISPLAY FORMAT.
∀ ENABLE ALL BODY MOTIONS.
DISABLE: α∀ FRAME MOTION. β∀ VERTEX MOTION. ε∀ PARTS MOTION.
_ STICKY DISPLAY MODE SWITCH.
↓ COPY PUSH. α↓ ROTATE PUSH.
↑ PADPDL POP. α↑ ROTATE POP.
↔ SWAP STACK 1ST ↔ 2ND 1ST α↔ 3RD 1ST β↔ LAST 2ND ε↔ 3RD
∩ FETCH DAD LINK,
∪ FETCH SON LINK,
⊂ FETCH BRO LINK.
⊃ FETCH SIS LINK.
< FETCH NFACE LINK.
> FETCH PFACE LINK.
≥ FETCH PED LINK.
≤ FETCH NED LINK.
∧ FETCH PVT LINK
∨ FETCH NVT LINK.
, CLOCKWISE LINK.
. COUNTER CLOCKWISE LINK.
⊗ FETCH UNIVERSE NODE.
← FETCH ALT LINK.
→ FETCH ALT2 LINK.
+ OTHER LINK.
GEOMED COMMAND SUMMARY:
α∩ BODY INTERSECTION.
α∪ BODY UNION.
α¬ BODY SUBTRACTION.
¬ BODY EVERT.
$ MAKE CONVEX.
| INVERT EDGE PARITY.
0-9 SET-DIGIT COMMAND.
? INFORMATION PREFIX.
# TWENTY CRLF'S.
∞ INSTANT CUBE. α∞ INSTANT TORUS.
A ATTACH, βAXECNT.
B BODY RETRIEVAL.
C COPY, αC NOW CAMERA.
D DETACH, αDARKEN, βDUAL, εUNDARKEN.
E SWEEP WIRE. εE EXIT.
F FRAME STEP SWITCH. αF SET FOCAL LENGTH. β UNSTEP FRAME SWITCH.
G GLUE COMMAND.
H HELP. αH UNHELP.
I INPUT B3D. αI INPUT CAMERA. βI INPUT CRE.
J JOIN VERTEX-VERTEX.
K KILL COMMAND.
L LABEL LIGHTS SWITCH.
M MIDPOINT COMMAND.
N NAME BODY
O OUTPUT COMMANDS.
P OUTPUT PLOT FILE
Q FRAME ORIGIN SWITCH.
R ROTATION COMPLETION.
S SWEEP COMMANDS.
T CREATE/EDIT TEXT LABEL.
U
V MAKE VERTEX BODY.
W MAKE: W WORLD. αW WINDOW. βW CAMERA. εW IMAGE.
X EXIT GEOMED.
Y
Z EXECUTE MACRO, αZ CREATE/EDIT MACRO, βZ INPUT COMMAND FILE.
ALT OCCULT. αALT FRONT FACE. βALT ALL EDGES.
GEOMED COMMAND SUMMARY:
TEXT EDIT COMMANDS:
System line edit commands, enter line edit mode.
<CR> Forward 1 line
<VT> Backward 1 line
αε> Forward 4 lines
αε< Backward 4 lines
αε≥ Forward 16 lines
αε≤ Backward 16 lines
εD Delete a line
εI Enter line insert mode
αZ Concatenate next line with current line
αεE Return to GEOMED
αεV Update display
αM Invoke a macro
αN Take commands from text file
----------------------------------------------------------------------
X EXTEND COMMANDS:
X CUBIC DX DY DZ MAKE CUBIC PRISM.
X BALL RADIUS M N MAKE SPHERE M LONGITUDES, N LATITUDES.
X CYLN RADIUS N DZ MAKE CYLINDER OF N-SIDES, HEIGHT DZ.
X COLOR 99R 99B 99G 99A COLOR RED, BLUE, GREEN, ALBEDO.
X NSHARP MARK ALL EDGES NOT SHARP
PRIMER: INSTANT CUBE, TRANSLATION.
This section is literally an operating manual; you are
supposed to be operating GEOMED as you read. I will tell you what
keys to type and you will type them to see for yourself what happens;
although an explanation is given later for each command, the
complexity of individual commands tends to obscure their use in
sequences. The system copy of GEOMED is started by typing "R GEOMED"
carriage return at a III display console. GEOMED will display a
rectangle, type an asterisk and await single character commands.
Typing carriage returns will yield more asterisks showing that GEOMED
is alive and listening.
INSTANT CUBE.
Type the character "∞" to get a drawing of a cube.
Adjust the pots on the III so that the cube looks right.
TRANSLATION.
Type the character ":" to move the cube right (positive x axis).
Type the character ";" to move the cube left (negative x axis).
Type the character ")" to move the cube up (positive y axis).
Type the character "(" to move the cube down (negative y axis).
Type the character "*" to move the cube nearer (positive z axis).
Type the character "-" to move the cube away (negative z axis).
Clearly these command characters are not mnemonics, they
were chosen because they do not require the TOP key and are
conveniently grouped in pairs under one's right hand.
STRENGTH OF TRANSLATION.
The distance the cube is moved by a translation command is
called the strength of translation or TDEL. The value of TDEL is
displayed in the upper right corner of the screen and is initially
one foot. The strength of translation is halved by typing the command
character "/" or doubled by typing "\".
WORLD FRAME OF REFERENCE.
The direction the cube moved was with respect to the world
frame of reference which is a right handed coordinate system, the
initial camera is positioned looking down the Z axis at the world
origin. The world origin is in the center of the display screen a
simulated sixteen feet away; and the positive world X axis is to your
right; and the positive world Y axis is upwards.
PRIMER: CONTROL, META, AND META-CONTROL.
Notice that the Stanford A.I. keyboard has four "shift" keys
labeled SHIFT, TOP, META & CONTROL. SHIFT only determines whether an
alphabetic letters is upper or lower case; GEOMED converts lower case
letters into upper so that the SHIFT key has no effect. The TOP key
allows two ASCII character codes to be on each physical key, this
doubling up on the physical keys is not important to GEOMED since
"TOP-E" can always be referred to as "@". Finally, of great
importance, the CONTROL and META keys add two extra bits to the 7-bit
ASCII code, so that a 9-bit character is sent to GEOMED. In this
document the characters "α", "β" and "ε" will be used as prefix
abbreviations for CONTROL, META and META-CONTROL keying of a
character. Furthermore, the command scanner accepts the characters
"α", "β" and "ε" as prefix modifiers that will add the appropriate
control and meta bits to the next character. The question mark
character, explained immediately below, is the only other prefix
modifier character.
QUESTION MARK "?".
Typing the question mark charcter "?" followed by any
character will type a one line reminder of what commands are invoked
by that character.
EXTENDED COMMAND SCANNER.
x-commands are executed by typing "X" followed by the first
three letters of a mnemonic (further letters are ignored) followed by
any necessary arguments, the command is terminated by a RETURN. The
arguments may be separated by any reasonible delimiters: space,
comma, tab, etc. The following three extend commands provide easy
creation of simple polyhedra.
X CUBIC DELTAX,DELTAY,DELTAZ
X BALL RADIUS,M-LONGUTUDES,N-LATITUDES
X CYLN RADIUS,N-SIDES,DZ-HEIGHT
The CUBIC command makes a right rectangular prism with width
height and depth as given in three distance arguments. The BALL
command make a polyhedron that approximates a sphere. The CYLN make a
right prism that approximates a circular cylinder.
EXAMPLES:
X CUB 2 3 4
X CYL 4 10 10
X BALL 1 6 10
PRIMER: ROTATION.
ROTATION.
The rotation command characters are the same as for
translation except you must hold the CONTROL key down or prefix the
command with an "α". Try rotating the instant cube about the X-axis
with "α:". The positive direction of rotation is counter-clockwise.
The negative direction of rotation is clockwise.
STRENGTH OF ROTATION.
The strength of rotation is named RDEL, the value of RDEL is
displayed in three formats in the upper right hand corner of the
screen: as a pi fraction and in degrees, minutes, seconds. The
initial value of RDEL is π/4, 45 degrees. Analogous to translation,
the strength of rotation is halved or doubled by "α/" and "α\"
respectively.
ROTATION DEFAULT.
Since a sequence of rotations is quite common, there is a way
to make the CTRL key be sticky. The usual Euclidean transformation
default is translation world frame; but after typing the "@" command
character, the Euclidean default is rotation world frame. Translation
default is restored by typing "!". The state of the Euclidean
transformation default is also displayed in the status in the upper
right hand corner of the screen. (The "≡" command disables the status
display, "≡" toggles).
THE STACK AND THE FEV RINGS.
GEOMED commands take their arguments from and leave their
results in a push down stack of bodies, faces, edges and vertices.
The contents of the stack are displayed on the left hand side of the
III screen. Having made a cube, you will have a B1 in the stack;
making a second cube will push a B2 into the stack. To retrieve B1
use the "↑" stack pop or the "α↑" stack rotate up or "α↓" stack
rotate down or "↔" the swap top of stack command. The "↓" command
pushs the stack down and places in the new top the entity that was
previously top of stack. A polyhedron consists of three rings
(circular double linked lists):
Face ring "<" NFACE,PFACE ">"
Edge ring "≤" NED,PED "≥"
Vertex ring "∨" NVT,PVT "∧"
The rings can be traveled using the command characters "<>≤≥∨∧" for
fetching the NFACE, PFACE, NED, PED, NVT and PVT link of the current
top of stack which is replaced. Notice that when a face, edge or
vertex node is in the top of the stack the corresponding entity is
intensified in the drawing.
PRIMER: DRAWING A CUBE.
After "∞" and "X CUBE", a third way to draw a cube will be
used to illustrate the primitive topology commands. Starting with a
fresh copy of GEOMED, type the command letters in the second column
to get the advertised results:
1. V Vertex body creation.
2. :) Position the vertex into the first quadrant.
3. S;; Make an edge and vertex and move left.
4. S(( Edge vertex down.
5. S:: Edge vertex right.
6. J↑ Join the first and last vertices of the wire.
7. * Pull the face lamina towards you.
8. S Sweep the square face into a very thin solid.
9. --↑ Move the face away from you giving the cube depth.
10. @/):! Rotate the cube to a more familiar position.
Three commands that have not been mentioned yet are:
"V" Vertex Body Creation.
"S" Sweep.
"J" Join two vertices with a new edge.
The "V" command takes no arguments and pushs a brand new
body, face and vertex into the stack. This degenerate point
polyhedron satisfies the Euler equation F-E+V=2 (1-0+1=2) and is
always placed at the world origin. The first three sweep commands in
the example, sweep a vertex polyhedron into a wire polyhedron by
adding a new vertex and a new edge; incidentally preserving Euler's
equation as do all GEOMED commands. The wire-sweep takes a Vertex
argument, and returns the new vertex. The new vertex has the same
locus as the argument vertex. After three sides of a square have been
formed, the "J" command creates a new face and a new edge between
the first and last vertex of the wire face. The wire-join case of
the "J" command takes a vertex argument and identifies it as the end
of a wire and knows enough to fetch the other end of that wire, as
its second argument.
PRIMER: DRAWING A TORUS.
1. V:@ First Vertex.
2. S*S*S* Seven more vertices.
S*S*S*S*
3. J↑ Form Lamina.
4. !//: Position the lamina.
5. @S)S)S)S) Sweep the face around the Y-axis.
S)S)S)S)
6. ↓>G↑ Glue the ends of the torus together.
EXERCISES.
1. DRAW THE SOMA CUBES AS IN FIGURE.
2. DRAW A JACK AS IN FIGURE.
HIDDEN LINE ELIMINATION
Hit the ALT-MODE key in order to see your drawing with its
hidden lines eliminated.
FRAMES OF REFERENCE
In addition to the world frame of reference, each body and camera
has a reference frame. The current frame of reference is determined by
a four state switch and the contents of the top of the stack.
PARTS TREE STRUCTURE
DILATION and REFLECTION